import { defineStore } from "pinia"
import { ref } from "vue"
import store from "@/store"
import { getCookie } from "@/utils/cache/cookies"

export const useLargeModelStore = defineStore("LargeModel", () => {
  const large_model_token = ref<string>(getCookie("large-model-token-cookie") || "")
  const SET_LARGE_MODEL_TOKEN = (token: string) => {
    large_model_token.value = token
  }

  const GET_LARGE_MODEL_TOKEN = async () => {
    return large_model_token.value
  }
  return { large_model_token, SET_LARGE_MODEL_TOKEN, GET_LARGE_MODEL_TOKEN }
})

export function useLargeModelStoreHooks() {
  return useLargeModelStore(store)
}
